<script language="JavaScript">

	function stAba(aba,conteudo)
	{
		this.aba = aba;
		this.conteudo = conteudo;
	}

	var arAbas = new Array();
	arAbas[0] = new stAba('td_veiculo','div_veiculo');
	arAbas[1] = new stAba('td_motorista','div_motorista');
	arAbas[2] = new stAba('td_dutDetran','div_dutDetran');
	arAbas[3] = new stAba('td_ipem','div_ipem');	
	arAbas[4] = new stAba('td_homologacao','div_homologacao');
	
	function AlternarAbas(aba,conteudo)
	{

		for (i=0;i<arAbas.length;i++)
		{
			m = document.getElementById(arAbas[i].aba);
			m.className = 'aba';
			c = document.getElementById(arAbas[i].conteudo)
			c.style.display = 'none';
		}
		m = document.getElementById(aba)
		m.className = 'aba-sel';
		c = document.getElementById(conteudo)
		c.style.display = '';
	}

</script>
<br>
<table width="1060" height="360" cellspacing="0" cellpadding="0" border="0" style="border-left: 1px solid #000000;">
	<tr>
		<td height="20" width="100" class="aba" id="td_veiculo"
		onClick="AlternarAbas('td_veiculo','div_veiculo')">
			<h5 id="title">Veiculo</h5>
		</td>
		<td height="20" width="100" class="aba" id="td_motorista"
		onClick="AlternarAbas('td_motorista','div_motorista')">
		<h5 id="title">Motorista</h5>
		</td>
		<td height="20" width="100" class="aba" id="td_dutDetran"
		onClick="AlternarAbas('td_dutDetran','div_dutDetran')">
			<h5 id="title">DutDetran</h5>
		</td>
		<td height="20" width="100" class="aba" id="td_ipem"
		onClick="AlternarAbas('td_ipem','div_ipem')">
		<h5 id="title">Ipem</h5>
		</td>
		<td height="20" width="100" class="aba" id="td_homologacao"
		onClick="AlternarAbas('td_homologacao','div_homologacao')">
		<h5 id="title">Homologação</h5>
		</td>		
		
		<td width="560"  height="20" style="border-bottom: 1px solid #000000">
			&nbsp;
		<td>
	</tr>
	<tr>
		<td height="360" class="tb-conteudo" colspan="7">
			<div id="div_veiculo" class="conteudo" style="display: none">
			   <%= render :partial => 'veiculo' %>
			</div>
			<div id="div_motorista" class="conteudo" style="display: none">
				<%= render :partial => 'motorista' %>
			</div>
			<div id="div_dutDetran" class="conteudo" style="display: none">
				<%= render :partial => 'dutDetran' %>
			</div>
			<div id="div_ipem" class="conteudo" style="display: none">
				<%= render :partial => 'ipem' %>
			</div>
			<div id="div_homologacao" class="conteudo" style="display: none">
				<%= render :partial => 'homologacao' %>
			</div>
		
		</td>
	</tr>
</table>
	<script>
		AlternarAbas('td_veiculo','div_veiculo');
	</script>	
	<br>
	<table border ="0" width="80%" class="formulario" cellpadding="20">
			<tr>
		<td width="40%" align="right" nowrap>
				
			
		</td>
		<td  align="left">
			<%= link_to "<img  src='/images/voltar_btn2.gif' alt='Voltar'/>", veiculos_path %>
			<input src="/images/salvar_btn.gif" type="image" alt="Salvar" />
		</td>
	</tr>	
</table>	
			
			

